//
//  SelectionViewController.h
//  XPhoto
//
//  Created by sentinel on 2020/4/7.
//  Copyright © 2020 baboy. All rights reserved.
//

#import "BKTableViewController.h"

NS_ASSUME_NONNULL_BEGIN
@protocol SelectionDelegate;
@class SelectionItem;
@interface SelectionViewController : BKTableViewController
@property(nonatomic, strong) NSArray *items;
@property(nonatomic, assign) NSInteger tag;
@property(nonatomic, assign) id<SelectionDelegate> delegate;
@property(nonatomic, assign) NSInteger selectedIndex;
@property(nonatomic, assign) NSInteger maxSelectionCount;
@end


@protocol SelectionDelegate <NSObject>

@optional
- (void)selectionViewController:(SelectionViewController *)vc didSelectItem:(SelectionItem *)item;
- (void)selectionViewControllerDidCanceled:(SelectionViewController *)vc;
@end
@interface SelectionItem : NSObject
@property(nonatomic, strong) UIImage *image;
@property(nonatomic, strong) NSString *title;
@property(nonatomic, strong) id value;
- (instancetype)initWithTitle:(NSString *)title value:(id)value;
@end
NS_ASSUME_NONNULL_END
